home *** CD-ROM | disk | FTP | other *** search
- <xsl:stylesheet version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
- xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
- xmlns:xhtml='http://www.w3.org/1999/xhtml'
- xmlns:slash='http://purl.org/rss/1.0/modules/slash/'
- xmlns:dc='http://purl.org/dc/elements/1.1/'
- exclude-result-prefixes='content slash dc'>
-
- <xsl:output method='xml' indent='yes' />
-
- <!-- channel group newspaper -->
- <xsl:template match="newspaper[@type='group']">
- <html>
- <head>
- <title><xsl:value-of select='title'/></title>
- <!-- <base href="{//channel/link}" /> -->
- <style><![CDATA[
- body {
- scrollbar-face-color: #FFFFFF;
- scrollbar-highlight-color: #0066CC;
- scrollbar-3dlight-color: #0066CC;
- scrollbar-darkshadow-color: #0066CC;
- scrollbar-shadow-color: #0066CC;
- scrollbar-arrow-color: #0066CC;
- scrollbar-track-color: #0066CC;
- background: #0066CC;
- font-family:Verdana;Arial;
- font-size:11pt;
- margin:0pt;
- padding:0pt; }
-
- .headTable {
- font-family:Verdana;
- Arial;
- color:#000000;
- cell-padding:2pt;
- background:#FFFFFF;
- width:100%;
- height:30px;
- margin: 10px;
- padding: 5px;
- border: 1px solid #000000; }
-
- .title {
- font-size:14pt;
- font-weight: normal;
- font-family: Arial, Helvetica, sans-serif;
- text-decoration: underline;
- }
- .date { font-size:9pt; }
- div.content {
- font-family:Verdana, Arial;
- font-size:10pt;
- margin:10pt;
- padding:5pt;
- border: 1px solid #000000;
- background-color: #FFFFFF; }
-
- td.title a:link { color:#0000CC;text-decoration:none;font-weight:normal; }
- td.title a:visited { color:#0000CC;text-decoration:none; }
- td.title a:hover { color:#0000FF;text-decoration:underline;font-weight:normal; }
- a:link { color:#0000CC;text-decoration:none;font-weight:normal; }
- a:visited {
- color:#0000CC;
- text-decoration:none;
- }
- a:hover { color:#0000FF;text-decoration:underline;font-weight:normal; }
- div.channeltitle { font-weight: bold; font-size: 130%; text-align: center; margin: 10px 0; }
- ]]></style>
- </head>
- <body>
- <xsl:for-each select="//channel">
- <a href='{current()/link}'><div class='channeltitle'><xsl:value-of select='current()/title' /></div></a>
- <xsl:for-each select='current()//item'>
- <div class='content'><span class="title"><xsl:value-of disable-output-escaping='yes' select='current()/title' /></span><br/><b><xsl:value-of select='current()/pubDate' /></b><br/> <xsl:choose> <xsl:when test='current()/xhtml:body'> <xsl:copy-of select='current()/xhtml:body'/>
- </xsl:when> <xsl:when test='current()/content:encoded'> <xsl:value-of disable-output-escaping='yes' select='current()/content:encoded'/>
- </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
- </xsl:otherwise> </xsl:choose> <br/>
- <br/>
- <a href='{current()/link}'>Read on...</a> <xsl:if test='current()/comments'> <xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:if>
- </div>
- <p><xsl:text disable-output-escaping='yes'> </xsl:text></p>
- </xsl:for-each>
- </xsl:for-each>
- </body></html>
- </xsl:template>
-
-
- <!-- channel newspaper -->
- <xsl:template match="newspaper[@type='channel']">
- <html>
- <head>
- <title><xsl:value-of select='//channel/title'/></title>
- <base href="{//channel/link}" />
- <style><![CDATA[
- body {
- scrollbar-face-color: #FFFFFF;
- scrollbar-highlight-color: #0066CC;
- scrollbar-3dlight-color: #0066CC;
- scrollbar-darkshadow-color: #0066CC;
- scrollbar-shadow-color: #0066CC;
- scrollbar-arrow-color: #0066CC;
- scrollbar-track-color: #0066CC;
- background: #0066CC;
- font-family:Verdana;Arial;
- font-size:11pt;
- margin:0pt;
- padding:0pt; }
-
- .headTable {
- font-family:Verdana;
- Arial;
- color:#000000;
- cell-padding:2pt;
- background:#FFFFFF;
- width:100%;
- height:30px;
- margin: 10px;
- padding: 5px;
- border: 1px solid #000000; }
-
- .title {
- font-size:14pt;
- font-weight: normal;
- font-family: Arial, Helvetica, sans-serif;
- text-decoration: underline;
- }
- .date { font-size:9pt; }
- div.content {
- font-family:Verdana, Arial;
- font-size:10pt;
- margin:10pt;
- padding:5pt;
- border: 1px solid #000000;
- background-color: #FFFFFF; }
-
- td.title a:link { color:#0000CC;text-decoration:none;font-weight:normal; }
- td.title a:visited { color:#0000CC;text-decoration:none; }
- td.title a:hover { color:#0000FF;text-decoration:underline;font-weight:normal; }
- a:link { color:#0000CC;text-decoration:none;font-weight:normal; }
- a:visited {
- color:#0000CC;
- text-decoration:none;
- }
- a:hover { color:#0000FF;text-decoration:underline;font-weight:normal; }
- div.channeltitle { font-weight: bold; font-size: 130%; text-align: center; margin: 10px 0; }
- ]]></style>
- </head>
- <body>
- <a href='{//channel/link}'><div class='channeltitle'><xsl:value-of select='//channel/title' /></div></a>
- <xsl:for-each select='//item'>
- <div class='content'><span class="title"><xsl:value-of disable-output-escaping='yes' select='current()/title' /></span><br/><b><xsl:value-of select='current()/pubDate' /></b><br/> <xsl:choose> <xsl:when test='current()/xhtml:body'> <xsl:copy-of select='current()/xhtml:body'/>
- </xsl:when> <xsl:when test='current()/content:encoded'> <xsl:value-of disable-output-escaping='yes' select='current()/content:encoded'/>
- </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
- </xsl:otherwise> </xsl:choose> <br/>
- <br/>
- <a href='{current()/link}'>Read on...</a> <xsl:if test='current()/comments'> <xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:if>
- </div>
- <p><xsl:text disable-output-escaping='yes'> </xsl:text></p>
- </xsl:for-each>
- </body></html>
- </xsl:template>
-
- <!-- single news item -->
- <xsl:template match="newspaper[@type='newsitem']">
- <html>
- <head>
- <title><xsl:value-of select='//item/title'/></title>
- <base href="{//item/link}" />
- <style><![CDATA[
- body {
- scrollbar-face-color: #FFFFFF;
- scrollbar-highlight-color: #0066CC;
- scrollbar-3dlight-color: #0066CC;
- scrollbar-darkshadow-color: #0066CC;
- scrollbar-shadow-color: #0066CC;
- scrollbar-arrow-color: #0066CC;
- scrollbar-track-color: #0066CC;
- background: #0066CC;
- font-family:Verdana;Arial;
- font-size:11pt;
- margin:0pt;
- padding:0pt; }
-
- .headTable {
- font-family:Verdana;
- Arial;
- color:#000000;
- cell-padding:2pt;
- background:#FFFFFF;
- width:100%;
- height:30px;
- margin: 10px;
- padding: 5px;
- border: 1px solid #000000; }
-
- .title {
- font-size:14pt;
- font-weight: normal;
- font-family: Arial, Helvetica, sans-serif;
- text-decoration: underline;
- }
- .date { font-size:9pt; }
- div.content {
- font-family:Verdana, Arial;
- font-size:10pt;
- margin:10pt;
- padding:5pt;
- border: 1px solid #000000;
- background-color: #FFFFFF; }
-
- td.title a:link { color:#0000CC;text-decoration:none;font-weight:normal; }
- td.title a:visited { color:#0000CC;text-decoration:none; }
- td.title a:hover { color:#0000FF;text-decoration:underline;font-weight:normal; }
- a:link { color:#0000CC;text-decoration:none;font-weight:normal; }
- a:visited {
- color:#0000CC;
- text-decoration:none;
- }
- a:hover { color:#0000FF;text-decoration:underline;font-weight:normal; }
- ]]></style>
- </head>
- <body>
- <div class='content'><span class="title"><xsl:value-of disable-output-escaping='yes' select='//item/title' /></span><br/><b><xsl:value-of select='//item/pubDate' /></b><br/> <xsl:choose> <xsl:when test='//item/xhtml:body'> <xsl:copy-of select='//item/xhtml:body'/>
- </xsl:when> <xsl:when test='//item/content:encoded'> <xsl:value-of disable-output-escaping='yes' select='//item/content:encoded'/>
- </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='//item/description'/>
- </xsl:otherwise> </xsl:choose> <br/>
- <br/>
- <a href='{//item/link}'>Read on...</a> <xsl:if test='//item/comments'> <xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:if>
- </div>
- <p><xsl:text disable-output-escaping='yes'> </xsl:text></p>
- </body></html>
- </xsl:template>
- </xsl:stylesheet>